package com.xh.bussiness.tiku.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xh.core.model.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 教材章节
 * </p>
 *
 * @author daiwei
 * @since 2019-02-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tiku_book_chapter")
public class BookChapter extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 教材版本
     */
    private String bookVersionId;

    /**
     * 父节点ID
     */
    private String parentId;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 节点路径ID
	 */
	private String parentPathId;

	/**
	 * 节点路径名称
	 */
	private String parentPathName;

	/**
	 * 章节节点路径ID
	 */
	private String path;

	/**
	 * 章节节点路径名称
	 */
	private String pathName;

	/**
	 * 描述
	 */
	private String description;
	/**
	 * 序号
	 */
	private Integer sortIndex;
	
	/**
	 * 子节点
	 */
	@TableField(exist=false)
	private List<BookChapter> childs;

	/**
	 * 章节下的知识点
	 */
	@TableField(exist = false)
	private List<Knowledge> knowledgeList;

	public BookChapter() {
		super();
	}
	
	public BookChapter(String id, String name, String bookVersionId, String description, Integer index, String parentId) {
		super();
		super.setId(id);
		this.name = name;
		this.bookVersionId = bookVersionId;
		this.description = description;
		this.sortIndex = index;
		this.parentId = parentId;
	}

}
